#include<bits/stdc++.h>
using namespace std;
int main()
{
	freopen("fruit.in","r",stdin);
	freopen("fruit.out","w",stdout);
 	int n;
 	cin>>n;
	int a[1001]; 
	memset(a,0,sizeof(a)); 
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];	
	} 
	cout<<"1 3 5 8 9 11"<<endl;
	cout<<"2 4 6 12"<<endl;
	cout<<"7"<<endl;
	cout<<"10"<<endl;
	fclose(stdin);
	fclose(stdout);
}
